#!/bin/sh

# Database info
DB_USER="rettc"
DB_PASS="123456"
DB_HOST="localhost"
DB_NAME="rettc"

# Others vars
BIN_DIR="/usr/bin"            #the mysql bin path
BCK_DIR="/home/rettc/mysqlBackup"    #the backup file directory
DATE=`date +%F`

# TODO
$BIN_DIR/mysqldump --opt -u$DB_USER -p$DB_PASS -h$DB_HOST $DB_NAME ｜ gzip > $BCK_DIR/db_$DATE.sql.gz